package com.ruoyi.business.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusinessMapper;
import com.ruoyi.business.domain.Business;
import com.ruoyi.business.service.IBusinessService;

/**
 * 商家入驻Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-12
 */
@Service
public class BusinessServiceImpl implements IBusinessService 
{
    @Autowired
    private BusinessMapper businessMapper;

    /**
     * 查询商家入驻
     * 
     * @param businessId 商家入驻主键
     * @return 商家入驻
     */
    @Override
    public Business selectBusinessByBusinessId(Long businessId)
    {
        return businessMapper.selectBusinessByBusinessId(businessId);
    }

    /**
     * 查询商家入驻列表
     * 
     * @param business 商家入驻
     * @return 商家入驻
     */
    @Override
    public List<Business> selectBusinessList(Business business)
    {
        return businessMapper.selectBusinessList(business);
    }

    /**
     * 新增商家入驻
     * 
     * @param business 商家入驻
     * @return 结果
     */
    @Override
    public int insertBusiness(Business business)
    {
        return businessMapper.insertBusiness(business);
    }

    /**
     * 修改商家入驻
     * 
     * @param business 商家入驻
     * @return 结果
     */
    @Override
    public int updateBusiness(Business business)
    {
        return businessMapper.updateBusiness(business);
    }

    /**
     * 批量删除商家入驻
     * 
     * @param businessIds 需要删除的商家入驻主键
     * @return 结果
     */
    @Override
    public int deleteBusinessByBusinessIds(Long[] businessIds)
    {
        return businessMapper.deleteBusinessByBusinessIds(businessIds);
    }

    /**
     * 删除商家入驻信息
     * 
     * @param businessId 商家入驻主键
     * @return 结果
     */
    @Override
    public int deleteBusinessByBusinessId(Long businessId)
    {
        return businessMapper.deleteBusinessByBusinessId(businessId);
    }
}
